package com.example.springbootmybatis.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

//@Data
//public class User {
//    private Integer id;
//    private String sname;
//    private String age;
//    private String email;
//    private double balance;
///}
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "s_user2") //标记表名和实体明的对应关系
public class User {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String name;
    private Integer age;
    private String email;

    public User(String name, Integer age, String email) {
        this.name = name;
        this.age = age;
        this.email = email;
    }
}

